// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Content API for Shopping Version v2sandbox
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://developers.google.com/shopping-content'>Content API for Shopping</a>
 *      <tr><th>API Version<td>v2sandbox
 *      <tr><th>API Rev<td>20170303 (792)
 *      <tr><th>API Docs
 *          <td><a href='https://developers.google.com/shopping-content'>
 *              https://developers.google.com/shopping-content</a>
 *      <tr><th>Discovery Name<td>content
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Content API for Shopping can be found at
 * <a href='https://developers.google.com/shopping-content'>https://developers.google.com/shopping-content</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.ShoppingContent.v2sandbox
{
    /// <summary>The ShoppingContent Service.</summary>
    public class ShoppingContentService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v2sandbox";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public ShoppingContentService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public ShoppingContentService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            orders = new OrdersResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "content"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/content/v2sandbox/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "content/v2sandbox/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Content API for Shopping.</summary>
        public class Scope
        {
            /// <summary>Manage your product listings and accounts for Google Shopping</summary>
            public static string Content = "https://www.googleapis.com/auth/content";

        }



        private readonly OrdersResource orders;

        /// <summary>Gets the Orders resource.</summary>
        public virtual OrdersResource Orders
        {
            get { return orders; }
        }
    }

    ///<summary>A base abstract class for ShoppingContent requests.</summary>
    public abstract class ShoppingContentBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new ShoppingContentBaseServiceRequest instance.</summary>
        protected ShoppingContentBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes ShoppingContent parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "orders" collection of methods.</summary>
    public class OrdersResource
    {
        private const string Resource = "orders";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public OrdersResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Marks an order as acknowledged. This method can only be called for non-multi-client
        /// accounts.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="orderId">The ID of the
        /// order.</param>
        public virtual AcknowledgeRequest Acknowledge(Google.Apis.ShoppingContent.v2sandbox.Data.OrdersAcknowledgeRequest body, ulong merchantId, string orderId)
        {
            return new AcknowledgeRequest(service, body, merchantId, orderId);
        }

        /// <summary>Marks an order as acknowledged. This method can only be called for non-multi-client
        /// accounts.</summary>
        public class AcknowledgeRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersAcknowledgeResponse>
        {
            /// <summary>Constructs a new Acknowledge request.</summary>
            public AcknowledgeRequest(Google.Apis.Services.IClientService service, Google.Apis.ShoppingContent.v2sandbox.Data.OrdersAcknowledgeRequest body, ulong merchantId, string orderId)
                : base(service)
            {
                MerchantId = merchantId;
                OrderId = orderId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The ID of the order.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string OrderId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ShoppingContent.v2sandbox.Data.OrdersAcknowledgeRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "acknowledge"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/orders/{orderId}/acknowledge"; }
            }

            /// <summary>Initializes Acknowledge parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". This method
        /// can only be called for non-multi-client accounts.</summary>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="orderId">The ID of the test
        /// order to modify.</param>
        public virtual AdvancetestorderRequest Advancetestorder(ulong merchantId, string orderId)
        {
            return new AdvancetestorderRequest(service, merchantId, orderId);
        }

        /// <summary>Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". This method
        /// can only be called for non-multi-client accounts.</summary>
        public class AdvancetestorderRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersAdvanceTestOrderResponse>
        {
            /// <summary>Constructs a new Advancetestorder request.</summary>
            public AdvancetestorderRequest(Google.Apis.Services.IClientService service, ulong merchantId, string orderId)
                : base(service)
            {
                MerchantId = merchantId;
                OrderId = orderId;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The ID of the test order to modify.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string OrderId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "advancetestorder"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/testorders/{orderId}/advance"; }
            }

            /// <summary>Initializes Advancetestorder parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Cancels all line items in an order. This method can only be called for non-multi-client
        /// accounts.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="orderId">The ID of the order
        /// to cancel.</param>
        public virtual CancelRequest Cancel(Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCancelRequest body, ulong merchantId, string orderId)
        {
            return new CancelRequest(service, body, merchantId, orderId);
        }

        /// <summary>Cancels all line items in an order. This method can only be called for non-multi-client
        /// accounts.</summary>
        public class CancelRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCancelResponse>
        {
            /// <summary>Constructs a new Cancel request.</summary>
            public CancelRequest(Google.Apis.Services.IClientService service, Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCancelRequest body, ulong merchantId, string orderId)
                : base(service)
            {
                MerchantId = merchantId;
                OrderId = orderId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The ID of the order to cancel.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string OrderId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCancelRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "cancel"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/orders/{orderId}/cancel"; }
            }

            /// <summary>Initializes Cancel parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Cancels a line item. This method can only be called for non-multi-client accounts.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="orderId">The ID of the
        /// order.</param>
        public virtual CancellineitemRequest Cancellineitem(Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCancelLineItemRequest body, ulong merchantId, string orderId)
        {
            return new CancellineitemRequest(service, body, merchantId, orderId);
        }

        /// <summary>Cancels a line item. This method can only be called for non-multi-client accounts.</summary>
        public class CancellineitemRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCancelLineItemResponse>
        {
            /// <summary>Constructs a new Cancellineitem request.</summary>
            public CancellineitemRequest(Google.Apis.Services.IClientService service, Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCancelLineItemRequest body, ulong merchantId, string orderId)
                : base(service)
            {
                MerchantId = merchantId;
                OrderId = orderId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The ID of the order.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string OrderId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCancelLineItemRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "cancellineitem"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/orders/{orderId}/cancelLineItem"; }
            }

            /// <summary>Initializes Cancellineitem parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Sandbox only. Creates a test order. This method can only be called for non-multi-client
        /// accounts.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="merchantId">The ID of the managing account.</param>
        public virtual CreatetestorderRequest Createtestorder(Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCreateTestOrderRequest body, ulong merchantId)
        {
            return new CreatetestorderRequest(service, body, merchantId);
        }

        /// <summary>Sandbox only. Creates a test order. This method can only be called for non-multi-client
        /// accounts.</summary>
        public class CreatetestorderRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCreateTestOrderResponse>
        {
            /// <summary>Constructs a new Createtestorder request.</summary>
            public CreatetestorderRequest(Google.Apis.Services.IClientService service, Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCreateTestOrderRequest body, ulong merchantId)
                : base(service)
            {
                MerchantId = merchantId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCreateTestOrderRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "createtestorder"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/testorders"; }
            }

            /// <summary>Initializes Createtestorder parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves or modifies multiple orders in a single request. This method can only be called for non-
        /// multi-client accounts.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual CustombatchRequest Custombatch(Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCustomBatchRequest body)
        {
            return new CustombatchRequest(service, body);
        }

        /// <summary>Retrieves or modifies multiple orders in a single request. This method can only be called for non-
        /// multi-client accounts.</summary>
        public class CustombatchRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCustomBatchResponse>
        {
            /// <summary>Constructs a new Custombatch request.</summary>
            public CustombatchRequest(Google.Apis.Services.IClientService service, Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCustomBatchRequest body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ShoppingContent.v2sandbox.Data.OrdersCustomBatchRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "custombatch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "orders/batch"; }
            }

            /// <summary>Initializes Custombatch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Retrieves an order from your Merchant Center account. This method can only be called for non-multi-
        /// client accounts.</summary>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="orderId">The ID of the
        /// order.</param>
        public virtual GetRequest Get(ulong merchantId, string orderId)
        {
            return new GetRequest(service, merchantId, orderId);
        }

        /// <summary>Retrieves an order from your Merchant Center account. This method can only be called for non-multi-
        /// client accounts.</summary>
        public class GetRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.Order>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, ulong merchantId, string orderId)
                : base(service)
            {
                MerchantId = merchantId;
                OrderId = orderId;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The ID of the order.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string OrderId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/orders/{orderId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves an order using merchant order id. This method can only be called for non-multi-client
        /// accounts.</summary>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="merchantOrderId">The merchant
        /// order id to be looked for.</param>
        public virtual GetbymerchantorderidRequest Getbymerchantorderid(ulong merchantId, string merchantOrderId)
        {
            return new GetbymerchantorderidRequest(service, merchantId, merchantOrderId);
        }

        /// <summary>Retrieves an order using merchant order id. This method can only be called for non-multi-client
        /// accounts.</summary>
        public class GetbymerchantorderidRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersGetByMerchantOrderIdResponse>
        {
            /// <summary>Constructs a new Getbymerchantorderid request.</summary>
            public GetbymerchantorderidRequest(Google.Apis.Services.IClientService service, ulong merchantId, string merchantOrderId)
                : base(service)
            {
                MerchantId = merchantId;
                MerchantOrderId = merchantOrderId;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The merchant order id to be looked for.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantOrderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string MerchantOrderId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "getbymerchantorderid"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/ordersbymerchantid/{merchantOrderId}"; }
            }

            /// <summary>Initializes Getbymerchantorderid parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "merchantOrderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantOrderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Sandbox only. Retrieves an order template that can be used to quickly create a new order in
        /// sandbox. This method can only be called for non-multi-client accounts.</summary>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="templateName">The name of the
        /// template to retrieve.</param>
        public virtual GettestordertemplateRequest Gettestordertemplate(ulong merchantId, GettestordertemplateRequest.TemplateNameEnum templateName)
        {
            return new GettestordertemplateRequest(service, merchantId, templateName);
        }

        /// <summary>Sandbox only. Retrieves an order template that can be used to quickly create a new order in
        /// sandbox. This method can only be called for non-multi-client accounts.</summary>
        public class GettestordertemplateRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersGetTestOrderTemplateResponse>
        {
            /// <summary>Constructs a new Gettestordertemplate request.</summary>
            public GettestordertemplateRequest(Google.Apis.Services.IClientService service, ulong merchantId, GettestordertemplateRequest.TemplateNameEnum templateName)
                : base(service)
            {
                MerchantId = merchantId;
                TemplateName = templateName;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The name of the template to retrieve.</summary>
            [Google.Apis.Util.RequestParameterAttribute("templateName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual TemplateNameEnum TemplateName { get; private set; }

            /// <summary>The name of the template to retrieve.</summary>
            public enum TemplateNameEnum
            {
                [Google.Apis.Util.StringValueAttribute("template1")]
                Template1,
                [Google.Apis.Util.StringValueAttribute("template1a")]
                Template1a,
                [Google.Apis.Util.StringValueAttribute("template1b")]
                Template1b,
                [Google.Apis.Util.StringValueAttribute("template2")]
                Template2,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "gettestordertemplate"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/testordertemplates/{templateName}"; }
            }

            /// <summary>Initializes Gettestordertemplate parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "templateName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "templateName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists the orders in your Merchant Center account. This method can only be called for non-multi-
        /// client accounts.</summary>
        /// <param name="merchantId">The ID of the managing account.</param>
        public virtual ListRequest List(ulong merchantId)
        {
            return new ListRequest(service, merchantId);
        }

        /// <summary>Lists the orders in your Merchant Center account. This method can only be called for non-multi-
        /// client accounts.</summary>
        public class ListRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, ulong merchantId)
                : base(service)
            {
                MerchantId = merchantId;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>Obtains orders that match the acknowledgement status. When set to true, obtains orders that
            /// have been acknowledged. When false, obtains orders that have not been acknowledged. We recommend using
            /// this filter set to false, in conjunction with the acknowledge call, such that only un-acknowledged
            /// orders are returned.</summary>
            [Google.Apis.Util.RequestParameterAttribute("acknowledged", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Acknowledged { get; set; }

            /// <summary>The maximum number of orders to return in the response, used for paging. The default value is
            /// 25 orders per page, and the maximum allowed value is 250 orders per page. Known issue: All List calls
            /// will return all Orders without limit regardless of the value of this field.</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>The ordering of the returned list. The only supported value are placedDate desc and placedDate
            /// asc for now, which returns orders sorted by placement date. "placedDate desc" stands for listing orders
            /// by placement date, from oldest to most recent. "placedDate asc" stands for listing orders by placement
            /// date, from most recent to oldest. In future releases we'll support other sorting criteria.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderBy", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<OrderByEnum> OrderBy { get; set; }

            /// <summary>The ordering of the returned list. The only supported value are placedDate desc and placedDate
            /// asc for now, which returns orders sorted by placement date. "placedDate desc" stands for listing orders
            /// by placement date, from oldest to most recent. "placedDate asc" stands for listing orders by placement
            /// date, from most recent to oldest. In future releases we'll support other sorting criteria.</summary>
            public enum OrderByEnum
            {
                [Google.Apis.Util.StringValueAttribute("placedDate asc")]
                PlacedDateAsc,
                [Google.Apis.Util.StringValueAttribute("placedDate desc")]
                PlacedDateDesc,
            }

            /// <summary>The token returned by the previous request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Obtains orders placed before this date (exclusively), in ISO 8601 format.</summary>
            [Google.Apis.Util.RequestParameterAttribute("placedDateEnd", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PlacedDateEnd { get; set; }

            /// <summary>Obtains orders placed after this date (inclusively), in ISO 8601 format.</summary>
            [Google.Apis.Util.RequestParameterAttribute("placedDateStart", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PlacedDateStart { get; set; }

            /// <summary>Obtains orders that match any of the specified statuses. Multiple values can be specified with
            /// comma separation. Additionally, please note that active is a shortcut for pendingShipment and
            /// partiallyShipped, and completed is a shortcut for shipped , partiallyDelivered, delivered,
            /// partiallyReturned, returned, and canceled.</summary>
            [Google.Apis.Util.RequestParameterAttribute("statuses", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<StatusesEnum> Statuses { get; set; }

            /// <summary>Obtains orders that match any of the specified statuses. Multiple values can be specified with
            /// comma separation. Additionally, please note that active is a shortcut for pendingShipment and
            /// partiallyShipped, and completed is a shortcut for shipped , partiallyDelivered, delivered,
            /// partiallyReturned, returned, and canceled.</summary>
            public enum StatusesEnum
            {
                [Google.Apis.Util.StringValueAttribute("active")]
                Active,
                [Google.Apis.Util.StringValueAttribute("canceled")]
                Canceled,
                [Google.Apis.Util.StringValueAttribute("completed")]
                Completed,
                [Google.Apis.Util.StringValueAttribute("delivered")]
                Delivered,
                [Google.Apis.Util.StringValueAttribute("inProgress")]
                InProgress,
                [Google.Apis.Util.StringValueAttribute("partiallyDelivered")]
                PartiallyDelivered,
                [Google.Apis.Util.StringValueAttribute("partiallyReturned")]
                PartiallyReturned,
                [Google.Apis.Util.StringValueAttribute("partiallyShipped")]
                PartiallyShipped,
                [Google.Apis.Util.StringValueAttribute("pendingShipment")]
                PendingShipment,
                [Google.Apis.Util.StringValueAttribute("returned")]
                Returned,
                [Google.Apis.Util.StringValueAttribute("shipped")]
                Shipped,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/orders"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "acknowledged", new Google.Apis.Discovery.Parameter
                    {
                        Name = "acknowledged",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderBy", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderBy",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "placedDateEnd", new Google.Apis.Discovery.Parameter
                    {
                        Name = "placedDateEnd",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "placedDateStart", new Google.Apis.Discovery.Parameter
                    {
                        Name = "placedDateStart",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "statuses", new Google.Apis.Discovery.Parameter
                    {
                        Name = "statuses",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Refund a portion of the order, up to the full amount paid. This method can only be called for non-
        /// multi-client accounts.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="orderId">The ID of the order
        /// to refund.</param>
        public virtual RefundRequest Refund(Google.Apis.ShoppingContent.v2sandbox.Data.OrdersRefundRequest body, ulong merchantId, string orderId)
        {
            return new RefundRequest(service, body, merchantId, orderId);
        }

        /// <summary>Refund a portion of the order, up to the full amount paid. This method can only be called for non-
        /// multi-client accounts.</summary>
        public class RefundRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersRefundResponse>
        {
            /// <summary>Constructs a new Refund request.</summary>
            public RefundRequest(Google.Apis.Services.IClientService service, Google.Apis.ShoppingContent.v2sandbox.Data.OrdersRefundRequest body, ulong merchantId, string orderId)
                : base(service)
            {
                MerchantId = merchantId;
                OrderId = orderId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The ID of the order to refund.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string OrderId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ShoppingContent.v2sandbox.Data.OrdersRefundRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "refund"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/orders/{orderId}/refund"; }
            }

            /// <summary>Initializes Refund parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Returns a line item. This method can only be called for non-multi-client accounts.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="orderId">The ID of the
        /// order.</param>
        public virtual ReturnlineitemRequest Returnlineitem(Google.Apis.ShoppingContent.v2sandbox.Data.OrdersReturnLineItemRequest body, ulong merchantId, string orderId)
        {
            return new ReturnlineitemRequest(service, body, merchantId, orderId);
        }

        /// <summary>Returns a line item. This method can only be called for non-multi-client accounts.</summary>
        public class ReturnlineitemRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersReturnLineItemResponse>
        {
            /// <summary>Constructs a new Returnlineitem request.</summary>
            public ReturnlineitemRequest(Google.Apis.Services.IClientService service, Google.Apis.ShoppingContent.v2sandbox.Data.OrdersReturnLineItemRequest body, ulong merchantId, string orderId)
                : base(service)
            {
                MerchantId = merchantId;
                OrderId = orderId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The ID of the order.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string OrderId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ShoppingContent.v2sandbox.Data.OrdersReturnLineItemRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "returnlineitem"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/orders/{orderId}/returnLineItem"; }
            }

            /// <summary>Initializes Returnlineitem parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Marks line item(s) as shipped. This method can only be called for non-multi-client
        /// accounts.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="orderId">The ID of the
        /// order.</param>
        public virtual ShiplineitemsRequest Shiplineitems(Google.Apis.ShoppingContent.v2sandbox.Data.OrdersShipLineItemsRequest body, ulong merchantId, string orderId)
        {
            return new ShiplineitemsRequest(service, body, merchantId, orderId);
        }

        /// <summary>Marks line item(s) as shipped. This method can only be called for non-multi-client
        /// accounts.</summary>
        public class ShiplineitemsRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersShipLineItemsResponse>
        {
            /// <summary>Constructs a new Shiplineitems request.</summary>
            public ShiplineitemsRequest(Google.Apis.Services.IClientService service, Google.Apis.ShoppingContent.v2sandbox.Data.OrdersShipLineItemsRequest body, ulong merchantId, string orderId)
                : base(service)
            {
                MerchantId = merchantId;
                OrderId = orderId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The ID of the order.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string OrderId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ShoppingContent.v2sandbox.Data.OrdersShipLineItemsRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "shiplineitems"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/orders/{orderId}/shipLineItems"; }
            }

            /// <summary>Initializes Shiplineitems parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates the merchant order ID for a given order. This method can only be called for non-multi-
        /// client accounts.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="orderId">The ID of the
        /// order.</param>
        public virtual UpdatemerchantorderidRequest Updatemerchantorderid(Google.Apis.ShoppingContent.v2sandbox.Data.OrdersUpdateMerchantOrderIdRequest body, ulong merchantId, string orderId)
        {
            return new UpdatemerchantorderidRequest(service, body, merchantId, orderId);
        }

        /// <summary>Updates the merchant order ID for a given order. This method can only be called for non-multi-
        /// client accounts.</summary>
        public class UpdatemerchantorderidRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersUpdateMerchantOrderIdResponse>
        {
            /// <summary>Constructs a new Updatemerchantorderid request.</summary>
            public UpdatemerchantorderidRequest(Google.Apis.Services.IClientService service, Google.Apis.ShoppingContent.v2sandbox.Data.OrdersUpdateMerchantOrderIdRequest body, ulong merchantId, string orderId)
                : base(service)
            {
                MerchantId = merchantId;
                OrderId = orderId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The ID of the order.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string OrderId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ShoppingContent.v2sandbox.Data.OrdersUpdateMerchantOrderIdRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "updatemerchantorderid"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/orders/{orderId}/updateMerchantOrderId"; }
            }

            /// <summary>Initializes Updatemerchantorderid parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a shipment's status, carrier, and/or tracking ID. This method can only be called for non-
        /// multi-client accounts.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="orderId">The ID of the
        /// order.</param>
        public virtual UpdateshipmentRequest Updateshipment(Google.Apis.ShoppingContent.v2sandbox.Data.OrdersUpdateShipmentRequest body, ulong merchantId, string orderId)
        {
            return new UpdateshipmentRequest(service, body, merchantId, orderId);
        }

        /// <summary>Updates a shipment's status, carrier, and/or tracking ID. This method can only be called for non-
        /// multi-client accounts.</summary>
        public class UpdateshipmentRequest : ShoppingContentBaseServiceRequest<Google.Apis.ShoppingContent.v2sandbox.Data.OrdersUpdateShipmentResponse>
        {
            /// <summary>Constructs a new Updateshipment request.</summary>
            public UpdateshipmentRequest(Google.Apis.Services.IClientService service, Google.Apis.ShoppingContent.v2sandbox.Data.OrdersUpdateShipmentRequest body, ulong merchantId, string orderId)
                : base(service)
            {
                MerchantId = merchantId;
                OrderId = orderId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the managing account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("merchantId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual ulong MerchantId { get; private set; }

            /// <summary>The ID of the order.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string OrderId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ShoppingContent.v2sandbox.Data.OrdersUpdateShipmentRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "updateshipment"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{merchantId}/orders/{orderId}/updateShipment"; }
            }

            /// <summary>Initializes Updateshipment parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "merchantId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "merchantId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.ShoppingContent.v2sandbox.Data
{    

    /// <summary>An error returned by the API.</summary>
    public class Error : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The domain of the error.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domain")]
        public virtual string Domain { get; set; } 

        /// <summary>A description of the error.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("message")]
        public virtual string Message { get; set; } 

        /// <summary>The error code.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A list of errors returned by a failed batch entry.</summary>
    public class Errors : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The HTTP status of the first error in errors.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual System.Nullable<long> Code { get; set; } 

        /// <summary>A list of errors.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errors")]
        public virtual System.Collections.Generic.IList<Error> ErrorsValue { get; set; } 

        /// <summary>The message of the first error in errors.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("message")]
        public virtual string Message { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class Order : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether the order was acknowledged.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("acknowledged")]
        public virtual System.Nullable<bool> Acknowledged { get; set; } 

        /// <summary>The channel type of the order: "purchaseOnGoogle" or "googleExpress".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("channelType")]
        public virtual string ChannelType { get; set; } 

        /// <summary>The details of the customer who placed the order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customer")]
        public virtual OrderCustomer Customer { get; set; } 

        /// <summary>The details for the delivery.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("deliveryDetails")]
        public virtual OrderDeliveryDetails DeliveryDetails { get; set; } 

        /// <summary>The REST id of the order. Globally unique.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string "content#order".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Line items that are ordered.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItems")]
        public virtual System.Collections.Generic.IList<OrderLineItem> LineItems { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("merchantId")]
        public virtual System.Nullable<ulong> MerchantId { get; set; } 

        /// <summary>Merchant-provided id of the order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("merchantOrderId")]
        public virtual string MerchantOrderId { get; set; } 

        /// <summary>The net amount for the order. For example, if an order was originally for a grand total of $100 and
        /// a refund was issued for $20, the net amount will be $80.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("netAmount")]
        public virtual Price NetAmount { get; set; } 

        /// <summary>The details of the payment method.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("paymentMethod")]
        public virtual OrderPaymentMethod PaymentMethod { get; set; } 

        /// <summary>The status of the payment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("paymentStatus")]
        public virtual string PaymentStatus { get; set; } 

        /// <summary>The date when the order was placed, in ISO 8601 format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("placedDate")]
        public virtual string PlacedDate { get; set; } 

        /// <summary>The details of the merchant provided promotions applied to the order. More details about the
        /// program are  here.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("promotions")]
        public virtual System.Collections.Generic.IList<OrderPromotion> Promotions { get; set; } 

        /// <summary>Refunds for the order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("refunds")]
        public virtual System.Collections.Generic.IList<OrderRefund> Refunds { get; set; } 

        /// <summary>Shipments of the order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shipments")]
        public virtual System.Collections.Generic.IList<OrderShipment> Shipments { get; set; } 

        /// <summary>The total cost of shipping for all items.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shippingCost")]
        public virtual Price ShippingCost { get; set; } 

        /// <summary>The tax for the total shipping cost.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shippingCostTax")]
        public virtual Price ShippingCostTax { get; set; } 

        /// <summary>The requested shipping option.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shippingOption")]
        public virtual string ShippingOption { get; set; } 

        /// <summary>The status of the order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderAddress : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>CLDR country code (e.g. "US").</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("country")]
        public virtual string Country { get; set; } 

        /// <summary>Strings representing the lines of the printed label for mailing the order, for example: John Smith
        /// 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fullAddress")]
        public virtual System.Collections.Generic.IList<string> FullAddress { get; set; } 

        /// <summary>Whether the address is a post office box.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isPostOfficeBox")]
        public virtual System.Nullable<bool> IsPostOfficeBox { get; set; } 

        /// <summary>City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods
        /// or suburbs).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("locality")]
        public virtual string Locality { get; set; } 

        /// <summary>Postal Code or ZIP (e.g. "94043").</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("postalCode")]
        public virtual string PostalCode { get; set; } 

        /// <summary>Name of the recipient.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("recipientName")]
        public virtual string RecipientName { get; set; } 

        /// <summary>Top-level administrative subdivision of the country (e.g. "CA").</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("region")]
        public virtual string Region { get; set; } 

        /// <summary>Street-level part of the address.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("streetAddress")]
        public virtual System.Collections.Generic.IList<string> StreetAddress { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderCancellation : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The actor that created the cancellation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("actor")]
        public virtual string Actor { get; set; } 

        /// <summary>Date on which the cancellation has been created, in ISO 8601 format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationDate")]
        public virtual string CreationDate { get; set; } 

        /// <summary>The quantity that was canceled.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantity")]
        public virtual System.Nullable<long> Quantity { get; set; } 

        /// <summary>The reason for the cancellation. Orders that are cancelled with a noInventory reason will lead to
        /// the removal of the product from POG until you make an update to that product. This will not affect your
        /// Shopping ads.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderCustomer : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Email address of the customer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("email")]
        public virtual string Email { get; set; } 

        /// <summary>If set, this indicates the user explicitly chose to opt in or out of providing marketing rights to
        /// the merchant. If unset, this indicates the user has already made this choice in a previous purchase, and was
        /// thus not shown the marketing right opt in/out checkbox during the checkout flow.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("explicitMarketingPreference")]
        public virtual System.Nullable<bool> ExplicitMarketingPreference { get; set; } 

        /// <summary>Full name of the customer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fullName")]
        public virtual string FullName { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderDeliveryDetails : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The delivery address</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("address")]
        public virtual OrderAddress Address { get; set; } 

        /// <summary>The phone number of the person receiving the delivery.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("phoneNumber")]
        public virtual string PhoneNumber { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderLineItem : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Cancellations of the line item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cancellations")]
        public virtual System.Collections.Generic.IList<OrderCancellation> Cancellations { get; set; } 

        /// <summary>The id of the line item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Total price for the line item. For example, if two items for $10 are purchased, the total price
        /// will be $20.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("price")]
        public virtual Price Price { get; set; } 

        /// <summary>Product data from the time of the order placement.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("product")]
        public virtual OrderLineItemProduct Product { get; set; } 

        /// <summary>Number of items canceled.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantityCanceled")]
        public virtual System.Nullable<long> QuantityCanceled { get; set; } 

        /// <summary>Number of items delivered.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantityDelivered")]
        public virtual System.Nullable<long> QuantityDelivered { get; set; } 

        /// <summary>Number of items ordered.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantityOrdered")]
        public virtual System.Nullable<long> QuantityOrdered { get; set; } 

        /// <summary>Number of items pending.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantityPending")]
        public virtual System.Nullable<long> QuantityPending { get; set; } 

        /// <summary>Number of items returned.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantityReturned")]
        public virtual System.Nullable<long> QuantityReturned { get; set; } 

        /// <summary>Number of items shipped.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantityShipped")]
        public virtual System.Nullable<long> QuantityShipped { get; set; } 

        /// <summary>Details of the return policy for the line item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("returnInfo")]
        public virtual OrderLineItemReturnInfo ReturnInfo { get; set; } 

        /// <summary>Returns of the line item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("returns")]
        public virtual System.Collections.Generic.IList<OrderReturn> Returns { get; set; } 

        /// <summary>Details of the requested shipping for the line item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shippingDetails")]
        public virtual OrderLineItemShippingDetails ShippingDetails { get; set; } 

        /// <summary>Total tax amount for the line item. For example, if two items are purchased, and each have a cost
        /// tax of $2, the total tax amount will be $4.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tax")]
        public virtual Price Tax { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderLineItemProduct : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Brand of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("brand")]
        public virtual string Brand { get; set; } 

        /// <summary>The item's channel (online or local).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("channel")]
        public virtual string Channel { get; set; } 

        /// <summary>Condition or state of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("condition")]
        public virtual string Condition { get; set; } 

        /// <summary>The two-letter ISO 639-1 language code for the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("contentLanguage")]
        public virtual string ContentLanguage { get; set; } 

        /// <summary>Global Trade Item Number (GTIN) of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("gtin")]
        public virtual string Gtin { get; set; } 

        /// <summary>The REST id of the product.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>URL of an image of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("imageLink")]
        public virtual string ImageLink { get; set; } 

        /// <summary>Shared identifier for all variants of the same product.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("itemGroupId")]
        public virtual string ItemGroupId { get; set; } 

        /// <summary>Manufacturer Part Number (MPN) of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mpn")]
        public virtual string Mpn { get; set; } 

        /// <summary>An identifier of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("offerId")]
        public virtual string OfferId { get; set; } 

        /// <summary>Price of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("price")]
        public virtual Price Price { get; set; } 

        /// <summary>URL to the cached image shown to the user when order was placed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shownImage")]
        public virtual string ShownImage { get; set; } 

        /// <summary>The CLDR territory code of the target country of the product.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("targetCountry")]
        public virtual string TargetCountry { get; set; } 

        /// <summary>The title of the product.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("title")]
        public virtual string Title { get; set; } 

        /// <summary>Variant attributes for the item. These are dimensions of the product, such as color, gender,
        /// material, pattern, and size. You can find a comprehensive list of variant attributes here.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("variantAttributes")]
        public virtual System.Collections.Generic.IList<OrderLineItemProductVariantAttribute> VariantAttributes { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderLineItemProductVariantAttribute : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The dimension of the variant.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dimension")]
        public virtual string Dimension { get; set; } 

        /// <summary>The value for the dimension.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderLineItemReturnInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>How many days later the item can be returned.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("daysToReturn")]
        public virtual System.Nullable<int> DaysToReturn { get; set; } 

        /// <summary>Whether the item is returnable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isReturnable")]
        public virtual System.Nullable<bool> IsReturnable { get; set; } 

        /// <summary>URL of the item return policy.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("policyUrl")]
        public virtual string PolicyUrl { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderLineItemShippingDetails : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The delivery by date, in ISO 8601 format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("deliverByDate")]
        public virtual string DeliverByDate { get; set; } 

        /// <summary>Details of the shipping method.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("method")]
        public virtual OrderLineItemShippingDetailsMethod Method { get; set; } 

        /// <summary>The ship by date, in ISO 8601 format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shipByDate")]
        public virtual string ShipByDate { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderLineItemShippingDetailsMethod : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The carrier for the shipping. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("carrier")]
        public virtual string Carrier { get; set; } 

        /// <summary>Maximum transit time.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxDaysInTransit")]
        public virtual System.Nullable<long> MaxDaysInTransit { get; set; } 

        /// <summary>The name of the shipping method.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("methodName")]
        public virtual string MethodName { get; set; } 

        /// <summary>Minimum transit time.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("minDaysInTransit")]
        public virtual System.Nullable<long> MinDaysInTransit { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderPaymentMethod : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The billing address.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("billingAddress")]
        public virtual OrderAddress BillingAddress { get; set; } 

        /// <summary>The card expiration month (January = 1, February = 2 etc.).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expirationMonth")]
        public virtual System.Nullable<int> ExpirationMonth { get; set; } 

        /// <summary>The card expiration year (4-digit, e.g. 2015).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expirationYear")]
        public virtual System.Nullable<int> ExpirationYear { get; set; } 

        /// <summary>The last four digits of the card number.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastFourDigits")]
        public virtual string LastFourDigits { get; set; } 

        /// <summary>The billing phone number.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("phoneNumber")]
        public virtual string PhoneNumber { get; set; } 

        /// <summary>The type of instrument (VISA, Mastercard, etc).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderPromotion : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("benefits")]
        public virtual System.Collections.Generic.IList<OrderPromotionBenefit> Benefits { get; set; } 

        /// <summary>The date and time frame when the promotion is active and ready for validation review. Note that the
        /// promotion live time may be delayed for a few hours due to the validation review. Start date and end date are
        /// separated by a forward slash (/). The start date is specified by the format (YYYY-MM-DD), followed by the
        /// letter ?T?, the time of the day when the sale starts (in Greenwich Mean Time, GMT), followed by an
        /// expression of the time zone for the sale. The end date is in the same format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("effectiveDates")]
        public virtual string EffectiveDates { get; set; } 

        /// <summary>Optional. The text code that corresponds to the promotion when applied on the retailer?s
        /// website.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("genericRedemptionCode")]
        public virtual string GenericRedemptionCode { get; set; } 

        /// <summary>The unique ID of the promotion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>The full title of the promotion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("longTitle")]
        public virtual string LongTitle { get; set; } 

        /// <summary>Whether the promotion is applicable to all products or only specific products.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("productApplicability")]
        public virtual string ProductApplicability { get; set; } 

        /// <summary>Indicates that the promotion is valid online.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("redemptionChannel")]
        public virtual string RedemptionChannel { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderPromotionBenefit : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The discount in the order price when the promotion is applied.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("discount")]
        public virtual Price Discount { get; set; } 

        /// <summary>The OfferId(s) that were purchased in this order and map to this specific benefit of the
        /// promotion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("offerIds")]
        public virtual System.Collections.Generic.IList<string> OfferIds { get; set; } 

        /// <summary>Further describes the benefit of the promotion. Note that we will expand on this enumeration as we
        /// support new promotion sub-types.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("subType")]
        public virtual string SubType { get; set; } 

        /// <summary>The impact on tax when the promotion is applied.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("taxImpact")]
        public virtual Price TaxImpact { get; set; } 

        /// <summary>Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free
        /// Shipping).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderRefund : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The actor that created the refund.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("actor")]
        public virtual string Actor { get; set; } 

        /// <summary>The amount that is refunded.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("amount")]
        public virtual Price Amount { get; set; } 

        /// <summary>Date on which the item has been created, in ISO 8601 format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationDate")]
        public virtual string CreationDate { get; set; } 

        /// <summary>The reason for the refund.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderReturn : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The actor that created the refund.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("actor")]
        public virtual string Actor { get; set; } 

        /// <summary>Date on which the item has been created, in ISO 8601 format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationDate")]
        public virtual string CreationDate { get; set; } 

        /// <summary>Quantity that is returned.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantity")]
        public virtual System.Nullable<long> Quantity { get; set; } 

        /// <summary>The reason for the return.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderShipment : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The carrier handling the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("carrier")]
        public virtual string Carrier { get; set; } 

        /// <summary>Date on which the shipment has been created, in ISO 8601 format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationDate")]
        public virtual string CreationDate { get; set; } 

        /// <summary>Date on which the shipment has been delivered, in ISO 8601 format. Present only if status is
        /// delievered</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("deliveryDate")]
        public virtual string DeliveryDate { get; set; } 

        /// <summary>The id of the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>The line items that are shipped.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItems")]
        public virtual System.Collections.Generic.IList<OrderShipmentLineItemShipment> LineItems { get; set; } 

        /// <summary>The status of the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>The tracking id for the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("trackingId")]
        public virtual string TrackingId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrderShipmentLineItemShipment : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The id of the line item that is shipped.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItemId")]
        public virtual string LineItemId { get; set; } 

        /// <summary>The quantity that is shipped.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantity")]
        public virtual System.Nullable<long> Quantity { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersAcknowledgeRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ID of the operation. Unique across all operations for a given order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersAcknowledgeResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The status of the execution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("executionStatus")]
        public virtual string ExecutionStatus { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersAcknowledgeResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersAdvanceTestOrderResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersAdvanceTestOrderResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCancelLineItemRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Amount to refund for the cancelation. Optional. If not set, Google will calculate the default based
        /// on the price and tax of the items involved. The amount must not be larger than the net amount left on the
        /// order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("amount")]
        public virtual Price Amount { get; set; } 

        /// <summary>The ID of the line item to cancel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItemId")]
        public virtual string LineItemId { get; set; } 

        /// <summary>The ID of the operation. Unique across all operations for a given order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>The quantity to cancel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantity")]
        public virtual System.Nullable<long> Quantity { get; set; } 

        /// <summary>The reason for the cancellation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCancelLineItemResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The status of the execution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("executionStatus")]
        public virtual string ExecutionStatus { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersCancelLineItemResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCancelRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ID of the operation. Unique across all operations for a given order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>The reason for the cancellation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCancelResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The status of the execution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("executionStatus")]
        public virtual string ExecutionStatus { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersCancelResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCreateTestOrderRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The test order template to use. Specify as an alternative to testOrder as a shortcut for retrieving
        /// a template and then creating an order using that template.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("templateName")]
        public virtual string TemplateName { get; set; } 

        /// <summary>The test order to create.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("testOrder")]
        public virtual TestOrder TestOrder { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCreateTestOrderResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersCreateTestOrderResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ID of the newly created test order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("orderId")]
        public virtual string OrderId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCustomBatchRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The request entries to be processed in the batch.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("entries")]
        public virtual System.Collections.Generic.IList<OrdersCustomBatchRequestEntry> Entries { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCustomBatchRequestEntry : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>An entry ID, unique within the batch request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("batchId")]
        public virtual System.Nullable<long> BatchId { get; set; } 

        /// <summary>Required for cancel method.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cancel")]
        public virtual OrdersCustomBatchRequestEntryCancel Cancel { get; set; } 

        /// <summary>Required for cancelLineItem method.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cancelLineItem")]
        public virtual OrdersCustomBatchRequestEntryCancelLineItem CancelLineItem { get; set; } 

        /// <summary>The ID of the managing account.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("merchantId")]
        public virtual System.Nullable<ulong> MerchantId { get; set; } 

        /// <summary>The merchant order id. Required for updateMerchantOrderId and getByMerchantOrderId
        /// methods.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("merchantOrderId")]
        public virtual string MerchantOrderId { get; set; } 

        /// <summary>The method to apply.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("method")]
        public virtual string Method { get; set; } 

        /// <summary>The ID of the operation. Unique across all operations for a given order. Required for all methods
        /// beside get and getByMerchantOrderId.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>The ID of the order. Required for all methods beside getByMerchantOrderId.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("orderId")]
        public virtual string OrderId { get; set; } 

        /// <summary>Required for refund method.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("refund")]
        public virtual OrdersCustomBatchRequestEntryRefund Refund { get; set; } 

        /// <summary>Required for returnLineItem method.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("returnLineItem")]
        public virtual OrdersCustomBatchRequestEntryReturnLineItem ReturnLineItem { get; set; } 

        /// <summary>Required for shipLineItems method.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shipLineItems")]
        public virtual OrdersCustomBatchRequestEntryShipLineItems ShipLineItems { get; set; } 

        /// <summary>Required for updateShipment method.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("updateShipment")]
        public virtual OrdersCustomBatchRequestEntryUpdateShipment UpdateShipment { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCustomBatchRequestEntryCancel : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The reason for the cancellation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCustomBatchRequestEntryCancelLineItem : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Amount to refund for the cancelation. Optional. If not set, Google will calculate the default based
        /// on the price and tax of the items involved. The amount must not be larger than the net amount left on the
        /// order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("amount")]
        public virtual Price Amount { get; set; } 

        /// <summary>The ID of the line item to cancel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItemId")]
        public virtual string LineItemId { get; set; } 

        /// <summary>The quantity to cancel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantity")]
        public virtual System.Nullable<long> Quantity { get; set; } 

        /// <summary>The reason for the cancellation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCustomBatchRequestEntryRefund : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The amount that is refunded.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("amount")]
        public virtual Price Amount { get; set; } 

        /// <summary>The reason for the refund.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCustomBatchRequestEntryReturnLineItem : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ID of the line item to return.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItemId")]
        public virtual string LineItemId { get; set; } 

        /// <summary>The quantity to return.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantity")]
        public virtual System.Nullable<long> Quantity { get; set; } 

        /// <summary>The reason for the return.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCustomBatchRequestEntryShipLineItems : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The carrier handling the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("carrier")]
        public virtual string Carrier { get; set; } 

        /// <summary>Line items to ship.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItems")]
        public virtual System.Collections.Generic.IList<OrderShipmentLineItemShipment> LineItems { get; set; } 

        /// <summary>The ID of the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shipmentId")]
        public virtual string ShipmentId { get; set; } 

        /// <summary>The tracking id for the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("trackingId")]
        public virtual string TrackingId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCustomBatchRequestEntryUpdateShipment : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The carrier handling the shipment. Not updated if missing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("carrier")]
        public virtual string Carrier { get; set; } 

        /// <summary>The ID of the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shipmentId")]
        public virtual string ShipmentId { get; set; } 

        /// <summary>New status for the shipment. Not updated if missing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>The tracking id for the shipment. Not updated if missing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("trackingId")]
        public virtual string TrackingId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCustomBatchResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The result of the execution of the batch requests.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("entries")]
        public virtual System.Collections.Generic.IList<OrdersCustomBatchResponseEntry> Entries { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersCustomBatchResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersCustomBatchResponseEntry : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ID of the request entry this entry responds to.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("batchId")]
        public virtual System.Nullable<long> BatchId { get; set; } 

        /// <summary>A list of errors defined if and only if the request failed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errors")]
        public virtual Errors Errors { get; set; } 

        /// <summary>The status of the execution. Only defined if the method is not get or getByMerchantOrderId and if
        /// the request was successful.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("executionStatus")]
        public virtual string ExecutionStatus { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersCustomBatchResponseEntry".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The retrieved order. Only defined if the method is get and if the request was successful.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("order")]
        public virtual Order Order { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersGetByMerchantOrderIdResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersGetByMerchantOrderIdResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The requested order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("order")]
        public virtual Order Order { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersGetTestOrderTemplateResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersGetTestOrderTemplateResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The requested test order template.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("template")]
        public virtual TestOrder Template { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersListResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The token for the retrieval of the next page of orders.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("resources")]
        public virtual System.Collections.Generic.IList<Order> Resources { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersRefundRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The amount that is refunded.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("amount")]
        public virtual Price Amount { get; set; } 

        /// <summary>The ID of the operation. Unique across all operations for a given order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>The reason for the refund.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersRefundResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The status of the execution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("executionStatus")]
        public virtual string ExecutionStatus { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersRefundResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersReturnLineItemRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ID of the line item to return.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItemId")]
        public virtual string LineItemId { get; set; } 

        /// <summary>The ID of the operation. Unique across all operations for a given order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>The quantity to return.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantity")]
        public virtual System.Nullable<long> Quantity { get; set; } 

        /// <summary>The reason for the return.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The explanation of the reason.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reasonText")]
        public virtual string ReasonText { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersReturnLineItemResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The status of the execution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("executionStatus")]
        public virtual string ExecutionStatus { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersReturnLineItemResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersShipLineItemsRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The carrier handling the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("carrier")]
        public virtual string Carrier { get; set; } 

        /// <summary>Line items to ship.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItems")]
        public virtual System.Collections.Generic.IList<OrderShipmentLineItemShipment> LineItems { get; set; } 

        /// <summary>The ID of the operation. Unique across all operations for a given order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>The ID of the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shipmentId")]
        public virtual string ShipmentId { get; set; } 

        /// <summary>The tracking id for the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("trackingId")]
        public virtual string TrackingId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersShipLineItemsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The status of the execution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("executionStatus")]
        public virtual string ExecutionStatus { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersShipLineItemsResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersUpdateMerchantOrderIdRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The merchant order id to be assigned to the order. Must be unique per merchant.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("merchantOrderId")]
        public virtual string MerchantOrderId { get; set; } 

        /// <summary>The ID of the operation. Unique across all operations for a given order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersUpdateMerchantOrderIdResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The status of the execution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("executionStatus")]
        public virtual string ExecutionStatus { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersUpdateMerchantOrderIdResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersUpdateShipmentRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The carrier handling the shipment. Not updated if missing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("carrier")]
        public virtual string Carrier { get; set; } 

        /// <summary>The ID of the operation. Unique across all operations for a given order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>The ID of the shipment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shipmentId")]
        public virtual string ShipmentId { get; set; } 

        /// <summary>New status for the shipment. Not updated if missing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>The tracking id for the shipment. Not updated if missing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("trackingId")]
        public virtual string TrackingId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class OrdersUpdateShipmentResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The status of the execution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("executionStatus")]
        public virtual string ExecutionStatus { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "content#ordersUpdateShipmentResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class Price : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The currency of the price.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("currency")]
        public virtual string Currency { get; set; } 

        /// <summary>The price represented as a number.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TestOrder : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The details of the customer who placed the order.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customer")]
        public virtual TestOrderCustomer Customer { get; set; } 

        /// <summary>Identifies what kind of resource this is. Value: the fixed string "content#testOrder".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Line items that are ordered. At least one line item must be provided.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItems")]
        public virtual System.Collections.Generic.IList<TestOrderLineItem> LineItems { get; set; } 

        /// <summary>The details of the payment method.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("paymentMethod")]
        public virtual TestOrderPaymentMethod PaymentMethod { get; set; } 

        /// <summary>Identifier of one of the predefined delivery addresses for the delivery.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("predefinedDeliveryAddress")]
        public virtual string PredefinedDeliveryAddress { get; set; } 

        /// <summary>The details of the merchant provided promotions applied to the order. More details about the
        /// program are  here.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("promotions")]
        public virtual System.Collections.Generic.IList<OrderPromotion> Promotions { get; set; } 

        /// <summary>The total cost of shipping for all items.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shippingCost")]
        public virtual Price ShippingCost { get; set; } 

        /// <summary>The tax for the total shipping cost.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shippingCostTax")]
        public virtual Price ShippingCostTax { get; set; } 

        /// <summary>The requested shipping option.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shippingOption")]
        public virtual string ShippingOption { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TestOrderCustomer : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Email address of the customer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("email")]
        public virtual string Email { get; set; } 

        /// <summary>If set, this indicates the user explicitly chose to opt in or out of providing marketing rights to
        /// the merchant. If unset, this indicates the user has already made this choice in a previous purchase, and was
        /// thus not shown the marketing right opt in/out checkbox during the checkout flow. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("explicitMarketingPreference")]
        public virtual System.Nullable<bool> ExplicitMarketingPreference { get; set; } 

        /// <summary>Full name of the customer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fullName")]
        public virtual string FullName { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TestOrderLineItem : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Product data from the time of the order placement.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("product")]
        public virtual TestOrderLineItemProduct Product { get; set; } 

        /// <summary>Number of items ordered.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quantityOrdered")]
        public virtual System.Nullable<long> QuantityOrdered { get; set; } 

        /// <summary>Details of the return policy for the line item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("returnInfo")]
        public virtual OrderLineItemReturnInfo ReturnInfo { get; set; } 

        /// <summary>Details of the requested shipping for the line item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shippingDetails")]
        public virtual OrderLineItemShippingDetails ShippingDetails { get; set; } 

        /// <summary>Unit tax for the line item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("unitTax")]
        public virtual Price UnitTax { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TestOrderLineItemProduct : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Brand of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("brand")]
        public virtual string Brand { get; set; } 

        /// <summary>The item's channel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("channel")]
        public virtual string Channel { get; set; } 

        /// <summary>Condition or state of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("condition")]
        public virtual string Condition { get; set; } 

        /// <summary>The two-letter ISO 639-1 language code for the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("contentLanguage")]
        public virtual string ContentLanguage { get; set; } 

        /// <summary>Global Trade Item Number (GTIN) of the item. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("gtin")]
        public virtual string Gtin { get; set; } 

        /// <summary>URL of an image of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("imageLink")]
        public virtual string ImageLink { get; set; } 

        /// <summary>Shared identifier for all variants of the same product. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("itemGroupId")]
        public virtual string ItemGroupId { get; set; } 

        /// <summary>Manufacturer Part Number (MPN) of the item. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mpn")]
        public virtual string Mpn { get; set; } 

        /// <summary>An identifier of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("offerId")]
        public virtual string OfferId { get; set; } 

        /// <summary>The price for the product.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("price")]
        public virtual Price Price { get; set; } 

        /// <summary>The CLDR territory code of the target country of the product.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("targetCountry")]
        public virtual string TargetCountry { get; set; } 

        /// <summary>The title of the product.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("title")]
        public virtual string Title { get; set; } 

        /// <summary>Variant attributes for the item. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("variantAttributes")]
        public virtual System.Collections.Generic.IList<OrderLineItemProductVariantAttribute> VariantAttributes { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TestOrderPaymentMethod : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The card expiration month (January = 1, February = 2 etc.).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expirationMonth")]
        public virtual System.Nullable<int> ExpirationMonth { get; set; } 

        /// <summary>The card expiration year (4-digit, e.g. 2015).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expirationYear")]
        public virtual System.Nullable<int> ExpirationYear { get; set; } 

        /// <summary>The last four digits of the card number.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastFourDigits")]
        public virtual string LastFourDigits { get; set; } 

        /// <summary>The billing address.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("predefinedBillingAddress")]
        public virtual string PredefinedBillingAddress { get; set; } 

        /// <summary>The type of instrument. Note that real orders might have different values than the four values
        /// accepted by createTestOrder.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
